﻿using DevExpress.Skins;
using System.Collections;
using System.ComponentModel;

namespace CXW.Core.Sharp
{
    /// <summary>解决方案属性窗口中 SkinName 属性,可变更属性值的枚举</summary>
    public class SkinNameTypeConverter : TypeConverter
    {
        public override TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
        {
            ArrayList values = new ArrayList();
            foreach (SkinContainer container in SkinManager.Default.Skins)
            {
                values.Add(container.SkinName);
            }
            return new TypeConverter.StandardValuesCollection(values);
        }

        public override bool GetStandardValuesExclusive(ITypeDescriptorContext context)
        {
            return true;
        }

        public override bool GetStandardValuesSupported(ITypeDescriptorContext context)
        {
            return true;
        }

    }
}
